<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Math Convert</title>
  </head>
  <body>
    <link rel="stylesheet" href="main.css"/>

    <h2>二进制</h2>
    <span class="span-input" role="textbox" id="binStr" contenteditable >0000</span>

    <h2>八进制</h2>
    <span class="span-input" role="textbox" contenteditable>000</span>

    </div>

    <script>

      const binStr = document.getElementById("binStr");
      binStr.onkeydown = (event)=>{
        console.log(event)
        
        console.log(binStr.innerText); 
        event.returnValue=false;
        
        return true;

      }

      function isValidInput( val ) {

      }

    </script>
  </body>
</html>